<template>
	<div>
		<h2 class="copyright">
			<span>版权所有  </span>渝ICP备19010173号-41
		</h2>
		<div class="foot-bottom">
			<view class="foot-nav-left">
				<button @click="switchTab('/pages/index/index')">
					<i class="hd-icon">&#xe767;</i>
					<h3>首页</h3>
				</button>
				<button open-type="contact">
					<i class="hd-icon">&#xe65e;</i>
					<h3>客服</h3>
				</button>
				<button @click="switchTab('/pages/personal/index')">
					<i class="hd-icon">&#xe60b;</i>
					<h3>会员</h3>
				</button>
			</view>
			<view class="foot-nav-right" v-if="!pay">
				<view @click="paynet">立即支付</view>
			</view>
            <view class="foot-nav-right-pay" v-if="pay">
            	<view class="li">查看物流</view>
            	<view  class="li" @click="navigateTo('/pages/goods/index')">逛逛其他商品</view>
            </view>
		</div>
	</div>
</template>

<script>
	export default {
	    data() {
	    	return {
                
	    	}
	    },
        props:{
          pay:{
            type:Boolean,
            default:false
          }  
        },
		methods:{
            navigateTo(url){
            	uni.redirectTo({
            	    url: url
            	});
            },
            switchTab(url){
            	uni.switchTab({
            	    url: url
            	});
            },
			paynet(){
				this.$emit('goPay')
			}
		},
	}
</script>

<style scoped lang="scss">
	.copyright{
		text-align: center;
		font-size:12px;
		color:#333;
		margin-bottom:148rpx;
		span{
			color:#999;
			margin-right:15rpx;
		}
	}
	.foot-bottom{
		background: #fff;
		position: fixed;
		bottom:0;
		width:100%;
		left:0;
		display: flex;
		z-index: 999;
		justify-content: space-between;
		height: 118rpx;
		.foot-nav-left{
			width:50%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			button{
			    background:none;
				width:33.3%;
				text-align: center;
				border-right:1px solid #ededed;
			    line-height: 44rpx;
				&:nth-last-of-type(1){
					border-right:none;
				}
				i{
					font-size:16px;
				}
				h3{
					font-size:12px;
					color:#666;
				}
			    &::after{
			        border:none;
			        border-radius:0;
			        height:auto;
			    }
			}
		}
		.foot-nav-right{
			width:50%;
			display: flex;
			justify-content: space-between;
			.li{
				width:100%;
				text-align: center;
				font-size:26rpx;
                color:#fff;
				line-height: 118rpx;
				background: linear-gradient(90deg, #ff5777, #ff468f);
			}
		}
        .foot-nav-right-pay{
            width:50%;
            display: flex;
            justify-content: space-between;
            .li{
            	width:50%;
            	text-align: center;
            	font-size:26rpx;
                color:#fff;
            	line-height: 118rpx;
            	background: linear-gradient(90deg, #ff5777, #ff468f);
                &:nth-of-type(1){
                    background: #9E9E9E;
                }
                &:nth-of-type(2){
                    background:#009688;
                }
            }
        }
	}
</style>
